//
//  MJRefreshStateHeader+YS.m
//  GuBoShi
//
//  Created by 邓成成 on 2017/4/6.
//  Copyright © 2017年 YiShi. All rights reserved.
//

#import "MJRefreshStateHeader+YS.h"
#import "UIImage+YS.h"
@implementation MJRefreshStateHeader (YS)

+ (instancetype)YSHeaderWithRefreshingBlock:(MJRefreshComponentRefreshingBlock)refreshingBlock{
    MJRefreshGifHeader *header = [MJRefreshGifHeader headerWithRefreshingBlock:refreshingBlock];
    
    NSArray *idleImages = [UIImage imagesForRefreshIdle];
    NSArray *refreshingImages = [UIImage imagesForRefreshPulling];
    
    [header setImages:idleImages forState:MJRefreshStateIdle]; // 设置下拉过程的动画图片
    [header setImages:refreshingImages forState:MJRefreshStatePulling]; // 设置即将刷新状态的动画图片（一松开就会刷新的状态）
    [header setImages:refreshingImages forState:MJRefreshStateRefreshing]; // 设置正在刷新状态的动画图片
    header.lastUpdatedTimeLabel.hidden = YES; // 隐藏时间
    header.stateLabel.hidden = YES; // 隐藏状态
    
    return header;
}


@end
